let $group := doc("division.xml")/DIVISION/GROUP
let $st := doc("responses.xml")/CLASS/STUDENT
for $g in $group
where $st[@sid = $g/@leader]/RESPONSES/NRESPONSE[@qID="year"] < $st[@sid = $g/STUDENT/@sID]/RESPONSES/NRESPONSE[@qID="year"]
return $g
